1. Field of the Invention
The present invention relates to a technology for detecting and handling an internet protocol (IP) packet error, and more particularly, to IP packet error handling technology, which can reduce a network load by generating an internet control message protocol (ICMP) cache for recording information concerning an IP packet field error and by discontinuing IP packet communication under certain conditions.
2. Description of the Related Art
An ICMP, which controls messages between a sending end and a receiving end and informs of an error, is defined in RFC-792 and operates in a network layer of the OSI 7-layer with an IP. Therefore, in a case where an error is generated in an IP packet received at a receiving end, reliability of the IP packet is guaranteed by re-transmitting an ICMP message embedded in the IP packet to a sending end and letting the sending end take necessary measures according to the generated error.
Due to the ongoing expansion of the Internet, differentiation requests in packet delivery according to new audio and video service patterns have occurred, and in the near future, new Internet addresses under a 32-bit addressing system of Internet Protocol version 4 (IPv4) will no longer be allowed. Thus, Internet Protocol version 6 (IPv6) using a 128-bit addressing system has appeared. FIG. 1A shows the configuration of an IPv6 packet, and FIG. 1B shows the configuration of a header of the IPv6 packet. The IPv6 packet consists of a basic header and a payload, and the payload consists of an extension header and an upper layer data packet such as a Transmission Control Protocol (TCP) packet and a User Datagram Protocol (UDP) packet. The basic header consists of 40 bytes of data, 32 bytes assigned to an IPv6 address and 8 bytes assigned to six fields. Among the six fields, a next header field identifies the kind of information of a data field immediately following the basic header. Also, the extension header in the payload includes a next header field that identifies the kind of information of a data field immediately following the extension header, and an option field, which identifies a type of the extension header.
Internet Control Message Protocol version 6 (ICMPv6) is a multi-purpose protocol for transferring an error message and an information message between IPv6 nodes. The ICMPv6 has been simplified by integrating Internet Control Message Protocol version 4 (ICMPv4), Internet Group Membership Protocol (IGMP), Address Resolution Protocol (ARP), and Reverse ARP (RARP), which had been scattered across a network layer, and removing a message type which was nearly unused in the ICMP.
An ICMPv6 message is transmitted by attaching it to an IPv6 packet and is identified by the value 58 in a next header field of the IPv6 header. Hereinafter, the IPv6 and the ICMPv6 are represented by IP and ICMP, respectively, unless otherwise specified.
FIG. 2A shows the format of a general ICMP message packet. An 8-bit type field represents a message type. If the most significant bit of the type field is 0, that is, if a type field value is 0-127, the message type is an error message, and if the most significant bit of the type field is 1, the message type is an information message. For example, a type field value 4 represents a parameter problem message generated in a case where a problem is discovered in a basic header field or an extension header field of an IP packet, and type field values 128 and 129 represent an echo request message and an echo reply message, respectively, used for performing a ping to judge whether an ICMP message packet can reach a target node.
An 8-bit code field represents detailed items of an ICMP message determined in the type field. For example, according to values of the code field, the parameter problem message is divided into a header field problem (code field value=0), an unrecognized next header (code field value=1), and an unrecognized IPv6 option (code field value=2).
A 16-bit checksum field is used for detecting an ICMP message error and partially an IP message error.
A message body is changed according to a message type determined in the type field. A message body of the parameter problem message is formed as shown in FIG. 2B. A pointer field identifies a position where an error is detected in an original message. Also, the message body lets a sending end take necessary measures to deal with an IP packet in which an error has been generated, by placing an IP packet that has caused generation of an ICMP message, following the pointer field.
FIG. 3 is a flowchart of a conventional method of handling a field error of an IP packet header, the method including the steps of receiving an IP packet at a receiving end, detecting an error from fields of the header, and transmitting an ICMP message to a sending end. When the receiving end receives an IP packet in step S402, a version field of a basic header of the IP packet is checked to determine whether the version of the IP packet is 6. If the version of the IP packet is not 6, an error handling function is called in step S410 to generate an ICMP message packet. The generated ICMP message packet is transmitted in step S412 to the sending end. In the same way, field values of the basic header of the IP packet are checked in steps S406 and S408 to determine whether the field values of the basic header are recognized values. If the field values of the basic header are not recognized values, the error handling function is called in steps S414 and S418 to generate ICMP message packets. The generated ICMP message packets are transmitted in steps S416 and S420 to the sending end. At this time, if an extension header exists, error detection is also performed for a next header field and an option field of the extension header. ICMP message packets are transmitted to the sending end in the same way. In addition, whenever an unreachable destination error, a packet too big error, or a time exceeded error is detected, a relevant ICMP message packet can be transmitted to the sending end.
Until now, since a relevant ICMP message packet has been repeatedly re-transmitted whenever an error was generated in a received IP packet, if a malicious user broke into a network and manipulated IP packets or tried a denial of service (DoS) attack, or if a serious problem in a path shared by more than two nodes occurred, it was difficult to evade the problems.
The reason is that since an ICMP message packet is a type of IP packet in which an ICMP message is added to an original IP packet, the size of the ICMP message packet is much larger than usual. Therefore, if ICMP message packets are re-transmitted to the sending end whenever intentionally manipulated packets are generated, the network becomes overloaded rendering normal communication impossible.